
func void ZS_HealSelf()
{
	Perception_Set_Minimal();
};

func int ZS_HealSelf_Loop()
{
	var int random;
	if(self.attribute[ATR_HITPOINTS] == self.attribute[ATR_HITPOINTS_MAX])
	{
		Npc_ClearAIQueue(self);
		return LOOP_END;
	};
	if(self.attribute[ATR_HITPOINTS_MAX] >= 1200)
	{
		if(self.guild != GIL_STRF)
		{
			CreateInvItems(self,ItPo_Health_Addon_04,1);
			if(Npc_HasItems(self,ItPo_Health_Addon_04) > 0)
			{
				AI_UseItem(self,ItPo_Health_Addon_04);
				return LOOP_CONTINUE;
			};
		};
	}
	else if(self.attribute[ATR_HITPOINTS_MAX] >= 600)
	{
		if(self.guild != GIL_STRF)
		{
			CreateInvItems(self,ItPo_Health_03,1);
			if(Npc_HasItems(self,ItPo_Health_03) > 0)
			{
				AI_UseItem(self,ItPo_Health_03);
				return LOOP_CONTINUE;
			};
		};
	}
	else if(self.attribute[ATR_HITPOINTS_MAX] >= 300)
	{
		if(self.guild != GIL_STRF)
		{
			CreateInvItems(self,ItPo_Health_02,1);
			if(Npc_HasItems(self,ItPo_Health_02) > 0)
			{
				AI_UseItem(self,ItPo_Health_02);
				return LOOP_CONTINUE;
			};
		};
	}
	else if(self.guild != GIL_STRF)
	{
		CreateInvItems(self,ItPo_Health_01,1);
		if(Npc_HasItems(self,ItPo_Health_01) > 0)
		{
			AI_UseItem(self,ItPo_Health_01);
			return LOOP_CONTINUE;
		};
	};
	return LOOP_END;
};

func void ZS_HealSelf_End()
{
};

